package com.hans.scala.clazz

import scala.reflect.ClassTag
import java.sql.{DriverManager, ResultSet}
import scala.collection.mutable

/**
 * 通配返回值
 * User: ZhangJuntao
 * Date: 2014/3/31
 * Time: 10:17
 */
object WildcardReturnTypeExample {

  def main(args: Array[String]) {
    val fun = (i: Int, str: String) => {
      println(i + " in fun.")
      i + "-"
    }
    val oc1 = new Other(fun, "Hans")
    oc1.test()
  }

  class Other(fun: (Int, String) => _, name: String) {
    def test() {
      println("name=>" + name)
      println(fun(1, "test"))
    }
  }
}

